<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset={CHARSET}"/>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" >
<title>$navtitle</title>
<meta name="description" content="$metakeywords" /> 
<meta name="keywords" content="$metadescription" />
<link rel="stylesheet" href="source/plugin/aljbd/css/sj/base.css" />
<link rel="stylesheet" href="source/plugin/aljbd/css/sj/module.css" />
<script src="source/plugin/aljbd/js/jquery.js"></script>
<script type="text/javascript">
    var jq = jQuery.noConflict();
</script>

<script src="source/plugin/aljbd/js/sj/jquery.plugin.js"></script>
<link rel="stylesheet" href="source/plugin/aljbd/css/sj/plugin.css" />
{template aljbd:common}
</head>

<body id="body">
<a name="top"></a>
{template aljbd:header}
<style type="text/css">
body {
    background: #ffffff;
}
.form-box fieldset {
    border: 0px solid #eee;
}
.form-box .form-item input[type="text"], .form-box .form-item input[type="password"], .form-box .form-item input[type="email"] {
    border: 1px solid #eee;
}
.form-box .form-item textarea {
    border: 1px solid #eee;
}
</style>
<div class="container module-review" id="mobile_body"><div class="panel-comm panel-fullsize">
    <div class="panel-body">
        <div class="form-box">
		<iframe style="display:none" name="myiframe" id="myiframe"></iframe>
            <form id="postform" name="postform" action="plugin.php?id=aljbd&act={$_GET['act']}" method="POST" 
            enctype="multipart/form-data" onsubmit="return checkPostReview(this);" target="myiframe">
                <input type="hidden" name="formhash" value="{FORMHASH}">
				<input type="hidden" name="nid" value="{$_GET['nid']}">
				<input type="hidden" name="bid" value="{$bid}">
				<input type="hidden" name="aljbd_notice_token" value="{eval echo create_token('aljbd_notice_token');}">
                <div class="form-item">
                    <fieldset>
                        <legend>{lang aljbd:s283}<span class="txt-warning">{lang aljbd:sj_dianping_2}</span>:</legend>
                        <div class="item-inline">
                            {eval echo dhtmlspecialchars($bd['name']);}
                        </div>
                    </fieldset>
                </div>
				 <div class="form-item">
                    <fieldset>
                        <legend>{lang aljbd:addnotice_4}<span class="txt-warning">{lang aljbd:sj_dianping_2}</span>:</legend>
                        <div class="item-inline">
                            <input type="text" class="px" name="subject" value="$n['subject']">
                        </div>
                    </fieldset>
                </div>
                <div class="form-item">
                    <fieldset>
                        <legend>{lang aljbd:s223}<span class="txt-warning">{lang aljbd:sj_dianping_2}</span>:</legend>
                        <div class="item-inline">
                            <select name="type" id="type" style="width:120px;" data-id="1" onchange="getregion(this,'notice')">
							<option value="">{lang aljbd:s224}</option>
							<!--{loop $typelist $typeid $type}-->
							<option value="$typeid" {if $typeid==$n['type']}selected{/if}>$type['subject']</option>
							<!--{/loop}-->
						</select>
						&nbsp;&nbsp;&nbsp;
						<span name="subtype" id="subtype">
						{if $n['subtype']}
						<select name="subtype" id="type" style="width:120px;">
							<!--{loop C::t('#aljbd#aljbd_type_notice')->fetch_all_by_upid($n['type']) $typeid $type}-->
							<option value="$typeid" {if $typeid==$n['subtype']}selected{/if}>$type['subject']</option>
							<!--{/loop}-->
						</select>
						{/if}
						</span>
                        </div>
                    </fieldset>
                </div>
                <script type="text/javascript">
				function getregion(t,u){
					var url ='';
					if(u){
						url = '&type='+u; 
					}
					if(u !='u'){
						var name = 'subtype3';
						if(jq(t).attr('data-id') == 1){
							var name = 'subtype';
						}
					}else{
						var name = 'region1';
						if(jq(t).attr('data-id') == 1){
							var name = 'subregion';
						}
					}
					var str = '<select name="'+name+'" onchange="getregion(this,\''+u+'\')" style="width:120px;"><option value="">\u8bf7\u9009\u62e9</option>';
					jq.post('plugin.php?id=$pluginid&act=linkage&upid='+jq(t).val()+url,function(data){
						if(data){
							jq.each(data,function(k,d){
							str+='<option value="'+k+'">'+d+'</option>';
							});
							str+='</select>';
							jq(t).next().remove();
							jq(t).after(str);
						}
						
					}, "json");
				}
				</script>
                <div class="form-item">
                    <fieldset>
                        <legend>{lang aljbd:addnotice_3}<span class="txt-warning"></span>:</legend>

                        <div class="item-inline">
						<textarea name="intro"  id="intro" >{$n['content']}</textarea>
                        </div>
                    </fieldset>
					
                </div>
                                <div class="form-submit">
                    <div class="btn-group-vertical full-width">
                        <button type="submit" name="submit" value="Y" class="btn btn-mycolor">{lang aljbd:sj_dianping_12}</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script>

function checkPostReview(form) {
    if(jq('#review_content').val().trim()=='') {
        alert('{lang aljbd:sj_dianping_13}');
        return false;
    }
    return true;
}
</script>
<script type="text/javascript">
function tips(txt, fun) {
	jq('.tips').remove();
	var div = jq('<div style="background: url(source/plugin/aljbd/images/tips.png);max-width: 85%;min-height: 77px;min-width: 270px;position: absolute;left: -1000px;top: -1000px;text-align: center;border-radius:10px;"><span style="color: #ffffff;line-height: 77px;font-size: 23px;">' + txt + '</span></div>');
	jq('body').append(div);
	div.css('zIndex', 9999999);
	div.css('left', parseInt((jq(window).width() - div.width()) / 2));
	var top = parseInt(jq(window).scrollTop() + (jq(window).height() - div.height()) / 2);
	div.css('top', top);
	setTimeout(function() {
		div.remove();
		if (fun) {
			fun();
		}
	}, 2000);
}

</script>
<SCRIPT LANGUAGE="JavaScript"> 

function countChoices(obj) 
{	
	var inputs = document.getElementsByName("businesstype[]");

	var checked_counts = 0;

	for(var i=0;i<inputs.length;i++){
		if(inputs[i].checked){
			checked_counts++;
		}
	}
	max = 3; 
	if (checked_counts > max) { 
		alert("{lang aljbd:dianping_3}" + max + "{lang aljbd:dianping_4}"); 
		obj.checked = false; 
	} 
} //--> 
</script>
</div>
{template aljbd:footer}
</body>
</html>